package group2assignone.ucm.administrator;

import group2assignone.ucm.UCController;
import group2assignone.view.administrator.AddNewManagerView;

/**
 *public class UCCancelAddManager implements UCController
 * This is the class for the cancell add new manager button
 * it recieves the addnew manager view as a paramater and disposes of it
 * and returns to the main administrator view
 * @author group2
 */
public class UCCancelAddManager implements UCController {

    private AddNewManagerView view;

    public UCCancelAddManager(AddNewManagerView v) {
        view = v;

    }

    /**
     * Use Case: Cancel add new Manager
     * Pre-Condition: Add new Manager UI
     * Post-Condition: UI is updated
     * 1. Customer clicks Cancel button
     * 2. System discards entered data
     * 3. System returns to main admin view
     */
    public void run() {
        view.dispose();
        UCUIAdminMainView ucmv = new UCUIAdminMainView();
        ucmv.run();
    }
}
